package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.ui.TreeItem;

public class EditChannelEvent extends GwtEvent<EditChannelEventHandler> {
    public static Type<EditChannelEventHandler> TYPE = new Type<EditChannelEventHandler>();

    private final TreeItem treeItem;

    public EditChannelEvent(TreeItem treeItem) {
        this.treeItem = treeItem;
    }

    public TreeItem getTreeItem() {
        return treeItem;
    }

    @Override
    public Type<EditChannelEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(EditChannelEventHandler handler) {
        handler.onEditChannel(this);
    }
}
